
import java.util.Scanner;
public class DGnxprint1 {
    public static void dg(int n){
        if (n < 10){
            System.out.print(n+" ");
        }else {
        dg(n / 10);
            System.out.print(n % 10+" ");

        }
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        dg(n);
    }
}
